<?php
// .-----------------------------------------------------------------------------------
// | WE TRY THE BEST WAY
// |-----------------------------------------------------------------------------------
// | Author: 贝贝 <hebiduhebi@163.com>
// | Copyright (c) 2013-2016 杭州博也网络科技, http://www.itboye.com. All Rights Reserved.
// |-----------------------------------------------------------------------------------


namespace app\shop\api;

use app\common\api\BaseApi;
use app\shop\model\OrdersInfoView;

class OrdersInfoViewApi extends BaseApi
{

    /**
     * 查询，不分页
     */
    const QUERY_NO_PAGING = "shop/OrdersInfoViewApi/queryNoPaging";
    /**
     * 添加
     */
    const ADD = "shop/OrdersInfoViewApi/add";
    /**
     * 保存
     */
    const SAVE = "shop/OrdersInfoViewApi/save";
    /**
     * 保存根据ID主键
     */
    const SAVE_BY_ID = "shop/OrdersInfoViewApi/saveByID";

    /**
     * 删除
     */
    const DELETE = "shop/OrdersInfoViewApi/delete";

    /**
     * 查询
     */
    const QUERY = "shop/OrdersInfoViewApi/query";
    /**
     * 查询一条数据
     */
    const GET_INFO = "shop/OrdersInfoViewApi/getInfo";

    /**
     * 统计
     */
    const COUNT = "shop/OrdersInfoViewApi/count";

    /**
     * 求和统计
     */
    const SUM="shop/OrdersInfoViewApi/sum";

    protected function _init()
    {
        $this->model = new OrdersInfoView();
    }

    // public function getInfo($map,$order=false){

    //     $result = $this->model->where($map)->find();

    //     if ($result === false) {
    //         $error = $this -> model -> getDbError();
    //         return $this -> apiReturnErr($error);
    //     } else {
    //         return $this -> apiReturnSuc($result);
    //     }
    // }

}
